package com.yc.cloud.openai.portal.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum ImagePromptType {
    //写实人物风格
    TEXT2IMAGE("1", "文生图");

    private final String key;
    private final String value;

    ImagePromptType(String key, String value) {
        this.key = key;
        this.value = value;
    }


    public static ImagePromptType fromKey(String key) {
        for (ImagePromptType provider : ImagePromptType.values()) {
            if (Objects.equals(provider.getKey(), key)) {
                return provider;
            }
        }
        throw new IllegalArgumentException("Unknown key: " + key);
    }
}
